package com.xy.open.feign.http.controller;
import com.xy.common.base.controller.BaseController;
import com.xy.common.base.entity.AjaxResult;
import com.xy.common.request.zqb.ZqbUserRequest;
import com.xy.open.feign.http.service.JmUserCallService;
import com.xy.open.feign.http.service.ZqbUserCallService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
@Slf4j
@RestController
@RequestMapping("/open/feign/http/")
public class OpenFeignHttpController extends BaseController {
    @Autowired
    private JmUserCallService jmUserCallService;
    @Autowired
    private ZqbUserCallService zqbUserCallService;
    /**
     * 调用挣钱豹新增用户操作
     * @return
     */
    @PostMapping("/zqb/user/add/user")
    public AjaxResult ZqbAddUser(@RequestBody ZqbUserRequest add){
        log.info("ZqbUserRequest：{}",add);
        return zqbUserCallService.AddUser(add);
    }
    /**
     * 调用假面查询用户认证数据操作
     * @return
     */
    @PostMapping("/jm/find/authenticate/")
    public AjaxResult FindAuthenticate(HttpServletRequest request,@RequestParam("authenticate_id")Integer authenticate_id){
        String parameter_authenticate_id = request.getParameter("authenticate_id");
        log.info("authenticate_id：{}",authenticate_id);
        log.info("parameter_authenticate_id：{}",parameter_authenticate_id);
        return jmUserCallService.FindAuthenticateData(authenticate_id);
    }
}
